<html>
<head><meta charset="utf-8"><title>website · wg-async-foundations · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/index.html">wg-async-foundations</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html">website</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="179919886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/179919886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Gilcher <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#179919886">(Nov 05 2019 at 10:44)</a>:</h4>
<p>Hi, I'd like to update the async examples on the website around the release. I would like to rely only on code supplied by the rust project. will we ship some kind of demo executor or will futures-executor continue to exist?</p>



<a name="179928870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/179928870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#179928870">(Nov 05 2019 at 12:58)</a>:</h4>
<p>to my knowledge we are not currently planning on shipping a demo executor -- there is an open PR on rust-lang/rust to add an unstable one, but it doesn't look like it's going to land at least from my perspective</p>



<a name="179930091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/179930091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Gilcher <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#179930091">(Nov 05 2019 at 13:15)</a>:</h4>
<p>Hm. Okay. I'll see how to deal with that.</p>



<a name="179943294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/179943294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Gilcher <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#179943294">(Nov 05 2019 at 15:35)</a>:</h4>
<p>Ah, and to be clear, it doesn't need to be in rust libstd.</p>



<a name="179945155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/179945155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#179945155">(Nov 05 2019 at 15:54)</a>:</h4>
<p>(everything not in libstd is sort of unofficial, right?)</p>



<a name="179945218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/179945218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#179945218">(Nov 05 2019 at 15:54)</a>:</h4>
<p>I guess a dummy executor could be built but it'd just loop through all the futures and poll them... pretty simple, but super inefficient and I wouldn't point to it</p>



<a name="179945274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/179945274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#179945274">(Nov 05 2019 at 15:55)</a>:</h4>
<p>maybe something like what <code>runtime</code> was meant to be could work here? or use tokio and async-std side by side? (There are other executors too though :/)</p>



<a name="179962794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/179962794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#179962794">(Nov 05 2019 at 18:44)</a>:</h4>
<p><span class="user-mention" data-user-id="215333">@Florian Gilcher</span> there has been some discussion of including a simple <code>block_on</code> in libstd -- <a href="#narrow/stream/187312-wg-async-foundations/topic/block_on.20in.20std" title="#narrow/stream/187312-wg-async-foundations/topic/block_on.20in.20std">it was discussed here</a></p>



<a name="179962827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/179962827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#179962827">(Nov 05 2019 at 18:45)</a>:</h4>
<p>The need to create standalone examples might be sufficient motivation indeed</p>



<a name="180007649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/180007649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthias247 <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#180007649">(Nov 06 2019 at 07:10)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Yes, that thread was for the PR <a href="https://github.com/rust-lang/rust/pull/65875" target="_blank" title="https://github.com/rust-lang/rust/pull/65875">https://github.com/rust-lang/rust/pull/65875</a> that <span class="user-mention" data-user-id="116122">@simulacrum</span> mentioned</p>



<a name="180007829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/180007829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthias247 <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#180007829">(Nov 06 2019 at 07:16)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> </p>
<blockquote>
<p>I guess a dummy executor could be built but it'd just loop through all the futures and poll them... pretty simple, but super inefficient and I wouldn't point to it</p>
</blockquote>
<p>I would not recommend that. I think it might lead to a few non ideal reactions:<br>
- It gives the impression that async/await is unfinished<br>
- It focusses too much on how Futures work under the hood, and not on what people can do with async/await<br>
- It encourages people to write their own executors. And while that's an interesting thing for learning purposes - it's actually not something we should recommend people to spend their time on. There are already enough simple executors out there.</p>
<p>In doubt I would just use <code>block_on</code> from futures-rs for demo purposes</p>



<a name="180023436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/180023436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#180023436">(Nov 06 2019 at 11:39)</a>:</h4>
<p>Does futures-rs have an executor then? I was under the impression that wasn't the case.</p>



<a name="180031348"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/180031348" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nemo157 <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#180031348">(Nov 06 2019 at 13:26)</a>:</h4>
<p>Yes, it contains 3 different executors</p>



<a name="180031414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/180031414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nemo157 <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#180031414">(Nov 06 2019 at 13:27)</a>:</h4>
<p>A multi-threaded pool, a single-threaded “pool” and a trivial single-future executor for <code>block_on</code></p>



<a name="180034852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/180034852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#180034852">(Nov 06 2019 at 14:03)</a>:</h4>
<p>interesting</p>



<a name="180034857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/180034857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#180034857">(Nov 06 2019 at 14:03)</a>:</h4>
<p>that is... surprising to me</p>



<a name="180049991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/180049991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> boats <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#180049991">(Nov 06 2019 at 16:30)</a>:</h4>
<p>right now examples should use <code>futures::block_on</code>. someday hopefully we'll have a way to block a thread on a future in std, but (in my opinion) we need to gather a bit more feedback around the design of that first.</p>



<a name="180056012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/180056012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Gilcher <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#180056012">(Nov 06 2019 at 17:26)</a>:</h4>
<p>K, okay, given the current discussions, I will no accept a code example that uses _any_ ecosystem library on the website.</p>



<a name="189059119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/189059119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#189059119">(Feb 25 2020 at 20:43)</a>:</h4>
<p>we should update <a href="https://rust-lang.github.io/compiler-team/working-groups/async-await/" target="_blank" title="https://rust-lang.github.io/compiler-team/working-groups/async-await/">the page on the compiler-team website</a>, <span class="user-mention" data-user-id="116883">@tmandry</span>, to redirect to wg-async-foundations, right?</p>



<a name="189059154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/189059154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#189059154">(Feb 25 2020 at 20:43)</a>:</h4>
<p>yeah</p>



<a name="189060583"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/189060583" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#189060583">(Feb 25 2020 at 20:59)</a>:</h4>
<p>I'll send you a change</p>



<a name="189061538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/189061538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#189061538">(Feb 25 2020 at 21:10)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <a href="https://github.com/rust-lang/compiler-team/pull/252" target="_blank" title="https://github.com/rust-lang/compiler-team/pull/252">https://github.com/rust-lang/compiler-team/pull/252</a></p>



<a name="189061574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/189061574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#189061574">(Feb 25 2020 at 21:11)</a>:</h4>
<p>merged</p>



<a name="189061626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/189061626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#189061626">(Feb 25 2020 at 21:11)</a>:</h4>
<p>I just copied over the "current goal" and "roadmap" stuff for now</p>



<a name="189061632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/189061632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#189061632">(Feb 25 2020 at 21:11)</a>:</h4>
<p>needs updating though</p>



<a name="189061651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/website/near/189061651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/website.html#189061651">(Feb 25 2020 at 21:12)</a>:</h4>
<p>but it's still roughly a good description</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>